← Back
Editing: index-legacy30.js
!function(){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},n(t)}function t(n){return function(n){if(Array.isArray(n))return e(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,t){if(n){if("string"==typeof n)return e(n,t);var r={}.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(n,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=Array(t);e<t;e++)r[e]=n[e];return r}function r(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),e.push.apply(e,r)}return e}function o(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?r(Object(e),!0).forEach(function(t){i(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):r(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function i(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,t,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",o=e.toStringTag||"@@toStringTag";function i(e,r,o,i){var u=r&&r.prototype instanceof l?r:l,f=Object.create(u.prototype);return a(f,"_invoke",function(e,r,o){var i,u,a,l=0,f=o||[],s=!1,p={p:0,n:0,v:n,a:m,f:m.bind(n,4),d:function(t,e){return i=t,u=0,a=n,p.n=e,c}};function m(e,r){for(u=e,a=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,i=f[t],m=p.p,v=i[2];e>3?(o=v===r)&&(a=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=n):i[0]<=m&&((o=e<2&&m<i[1])?(u=0,p.v=r,p.n=i[1]):m<v&&(o=e<3||i[0]>r||r>v)&&(i[4]=e,i[5]=r,p.n=v,u=0))}if(o||e>1)return c;throw s=!0,r}return function(o,f,v){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&m(f,v),u=f,a=v;(t=u<2?n:a)||!s;){i||(u?u<3?(u>1&&(p.n=-1),m(u,a)):p.n=a:p.v=a);try{if(l=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=n}else if((t=(s=p.n<0)?a:e.call(r,p))!==c)break}catch(t){i=n,u=1,a=t}finally{l=1}}return{value:t,done:s}}}(e,o,i),!0),f}var c={};function l(){}function f(){}function s(){}t=Object.getPrototypeOf;var p=[][r]?t(t([][r]())):(a(t={},r,function(){return this}),t),m=s.prototype=l.prototype=Object.create(p);function v(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,s):(n.__proto__=s,a(n,o,"GeneratorFunction")),n.prototype=Object.create(m),n}return f.prototype=s,a(m,"constructor",s),a(s,"constructor",f),f.displayName="GeneratorFunction",a(s,o,"GeneratorFunction"),a(m),a(m,o,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),(u=function(){return{w:i,m:v}})()}function a(n,t,e,r){var o=Object.defineProperty;try{o({},"",{})}catch(n){o=0}a=function(n,t,e,r){function i(t,e){a(n,t,function(n){return this._invoke(t,e,n)})}t?o?o(n,t,{value:e,enumerable:!r,configurable:!r,writable:!r}):n[t]=e:(i("next",0),i("throw",1),i("return",2))},a(n,t,e,r)}function c(n,t,e,r,o,i,u){try{var a=n[i](u),c=a.value}catch(n){return void e(n)}a.done?t(c):Promise.resolve(c).then(r,o)}function l(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var i=n.apply(t,e);function u(n){c(i,r,o,u,a,"next",n)}function a(n){c(i,r,o,u,a,"throw",n)}u(void 0)})}}System.register(["./index-legacy93.js?v=1765440387","./index-legacy91.js?v=1765440387","./base-lib-legacy.js?v=1765440387","./utils-lib-legacy.js?v=1765440387","./useMethods-legacy.js?v=1765440387","./column-legacy.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387","./index-legacy94.js?v=1765440387"],function(n,e){"use strict";var r,i,a,c,f,s,p,m,v,y,d,b,h,g,w,j,O,k,C,S,_,x,P,T,A,D,R,I,N,E,B,G,L,q,z,F,M,V,H,J;return{setters:[function(n){r=n._},function(n){i=n._},function(n){a=n.k,c=n.r,f=n.c,s=n.e,p=n.aR,m=n.bb,v=n.w,y=n.p,d=n.a5,b=n.q,h=n.v,g=n.A,w=n.y,j=n.x,O=n.O},function(n){k=n.ay,C=n.a8,S=n.K,_=n.bZ,x=n.o,P=n.bY,T=n.l,A=n.L,D=n.u,R=n.aM,I=n.a6,N=n.A,E=n.v,B=n.R,G=n.N,L=n.e},function(n){q=n.o,z=n.b,F=n.a,M=n.N},function(n){V=n.c,H=n.a,J=n.u},null,null],execute:function(){var K,U=k(),W=U.refs,Y=W.customLimit,Z=W.isRefreshTableList,$=U.getCurrentCon,Q=a({search:"",isRefresh:!0}),X=c([]),nn=function(){var n=l(u().m(function n(t,e,r,o,i){var a,c,f;return u().w(function(n){for(;;)switch(n.n){case 0:return a=o.label,c=o.value,f=function(){var n=l(u().m(function n(t,e){var r,o,i,a;return u().w(function(n){for(;;)switch(n.n){case 0:r=t.id,o=t.name,a=c,n.n="delete"===a?1:3;break;case 1:return i={id:r,name:o,force:"0"},n.n=2,P({data:JSON.stringify(i)});case 2:return n.a(2,n.v);case 3:return n.a(2)}},n)}));return function(t,e){return n.apply(this,arguments)}}(),n.n=1,t({title:"批量".concat(a,"镜像"),content:"批量".concat(a,"已选的镜像,是否继续操作!"),column:[{label:"镜像名",prop:"name"},V()],onConfirm:function(){var n=l(u().m(function n(){return u().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,e(f);case 1:return Z.value=!0,n.a(2,!1)}},n)}));return function(){return n.apply(this,arguments)}}()});case 1:return n.a(2)}},n)}));return function(t,e,r,o,i){return n.apply(this,arguments)}}(),tn=[{active:!0,label:"从仓库中拉取",type:"button",onClick:function(){T({component:function(){return A(function(){return e.import("./index-legacy208.js?v=1765440387")},void 0,e.meta.url)},title:"拉取镜像",area:64})}},{active:!1,label:"导入镜像",type:"button",onClick:function(){T({component:function(){return A(function(){return e.import("./index-legacy209.js?v=1765440387")},void 0,e.meta.url)},title:"导入镜像",area:43,btn:"导入"})}},{active:!1,label:"构建镜像",type:"button",onClick:function(){T({component:function(){return A(function(){return e.import("./index-legacy210.js?v=1765440387")},void 0,e.meta.url)},title:"构建镜像",area:54,btn:"提交"})}},{active:!1,label:"线上镜像",type:"button",onClick:function(){T({component:function(){return A(function(){return e.import("./index-legacy29.js?v=1765440387").then(function(n){return n.a})},void 0,e.meta.url)},title:"Docker线上镜像搜索",area:80})}},{active:!1,label:"清理镜像",type:"button",onClick:(K=l(u().m(function n(){return u().w(function(n){for(;;)switch(n.n){case 0:T({component:function(){return A(function(){return e.import("./clear-confirm-legacy.js?v=1765440387")},void 0,e.meta.url)},title:"清理镜像",area:35,btn:!0});case 1:return n.a(2)}},n)})),function(){return K.apply(this,arguments)})}],en=function(){var n=l(u().m(function n(t,e){var r;return u().w(function(n){for(;;)switch(n.p=n.n){case 0:return r={id:t.id,name:t.name,force:"0"},n.p=1,n.n=2,x({type:"calc",title:"删除镜像【".concat(t.name,"】"),width:"35rem",content:"您真的要删除镜像【".concat(t.name,"】吗?")});case 2:S({request:P({data:JSON.stringify(r)}),message:!0,success:function(){e()}}),n.n=4;break;case 3:n.p=3,n.v;case 4:return n.a(2)}},n,null,[[1,3]])}));return function(t,e){return n.apply(this,arguments)}}(),rn=function(n){T({component:function(){return A(function(){return e.import("./index-legacy211.js?v=1765440387")},void 0,e.meta.url)},title:"推送【".concat(n.name,"】到仓库"),area:43,btn:!0,compData:{row:n}})},on=function(n){T({component:function(){return A(function(){return e.import("./index-legacy212.js?v=1765440387")},void 0,e.meta.url)},title:"导出【".concat(n.name,"】镜像"),area:43,btn:"导出",compData:{row:n}})},un=function(){var n=l(u().m(function n(t){return u().w(function(n){for(;;)switch(n.n){case 0:F({image:t.name});case 1:return n.a(2)}},n)}));return function(t){return n.apply(this,arguments)}}(),an=function(){var n=l(u().m(function n(t){var e;return u().w(function(n){for(;;)switch(n.n){case 0:return e={id:t.container_id,name:t.container_name},n.n=1,$(e.id);case 1:q(e);case 2:return n.a(2)}},n)}));return function(t){return n.apply(this,arguments)}}(),cn=function(){var n=l(u().m(function n(t,e){var r,i,a;return u().w(function(n){for(;;)switch(n.p=n.n){case 0:return n.p=0,r=t.toLowerCase(),i=["name","id","container"],a=X.value.filter(function(n){var t=o(o({},n),{},{container:n.containers.map(function(n){return n.container_name}).join("")||""});return i.some(function(n){var e;return null===(e=t[n])||void 0===e?void 0:e.toLowerCase().includes(r)})}),n.a(2,{data:z({limit:e.limit,list:a,p:e.p})||[],total:a.length});case 1:return n.p=1,n.v,n.a(2,{data:[],total:0})}},n,null,[[0,1]])}));return function(t,e){return n.apply(this,arguments)}}(),ln=C([{label:"删除项目",value:"delete",event:nn}]),fn=function(){var n=l(u().m(function n(t,e){var r;return u().w(function(n){for(;;)switch(n.n){case 0:if(Z.value=!1,!e){n.n=1;break}return n.a(2,cn(t.search,t));case 1:if(Q.isRefresh){n.n=2;break}return n.a(2,{data:z({limit:t.limit,list:X.value,p:t.p})||[],total:X.value.length});case 2:return Q.isRefresh=!1,n.n=3,S({request:_(),data:Array});case 3:return r=n.v,X.value=r,n.a(2,{data:z({limit:t.limit,list:X.value,p:t.p})||[],total:X.value.length})}},n)}));return function(t,e){return n.apply(this,arguments)}}(),sn=function(n,t){setTimeout(function(){Y.value.images||function(n,t){setTimeout(function(){n.value>900?t.value.limit=20:t.value.limit=10},0)}(n,t)},0)},pn={class:"relative"},mn={class:"flex items-center"},vn=f({__name:"index",setup:function(n){var e=k().refs.isRefreshTableList,o=D().mainHeight,a=R({options:tn}).BtOperation,c=!1,f=function(n,t){Q.isRefresh=!0,n&&!isNaN(n)&&(A.value.p=n),t?(A.value.search=t,c=!0):c=!1,T()},C=I({request:function(n){return fn(n,c)},columns:[H(),{label:"ID",prop:"id",width:110,render:function(n){var t=n.id.slice(7);return s(p,{placement:"top"},{default:function(){return s("div",{onClick:function(){return N({value:n.id})}},[t.slice(0,12)])},content:function(){return s("div",null,[n.id])}})}},{label:"镜像名",prop:"name",isCustom:!0},{label:"大小",prop:"size",width:100,isCustom:!0,render:function(n){return E(n.size)}},{label:"创建时间",prop:"time",width:160,isCustom:!0,render:function(n){return B(n.time)}},{label:"使用镜像的容器",prop:"used",minWidth:180,isCustom:!0,render:function(n){return 1!==n.used?"--":G(n.containers)&&n.containers.length>0?s("span",{class:"flex items-center whitespace-pre-wrap gap-4 min-h-[3rem]"},[n.containers.map(function(n){return s(m,{class:"mr-1 cursor-pointer",type:"success",size:"small",onClick:function(){return an(n)}},{default:function(){return[n.container_name]}})})]):"--"}},J([{onClick:un,width:80,title:"创建容器"},{onClick:rn,title:"推送"},{onClick:on,title:"导出"},{onClick:function(n){return en(n,f)},title:"删除"}])],extension:[ln]}),S=C.BtTable,_=C.BtPage,x=C.BtBatch,P=C.BtColumn,T=C.refresh,A=C.param;return v(function(){return e.value},function(n){n&&(f(),e.value=!1)}),y(l(u().m(function n(){return u().w(function(n){for(;;)switch(n.n){case 0:sn(o,A);case 1:return n.a(2)}},n)}))),d(function(){Q.search="",Q.isRefresh=!0,X.value=[]}),function(n,e){var u=i,c=r;return b(),h("div",pn,[s(c,null,{"header-left":g(function(){return[w("div",mn,[s(j(a)),w("a",{class:"ml-[1rem] bt-link",onClick:e[0]||(e[0]=function(){return j(M)&&j(M).apply(void 0,arguments)})},"需求反馈")])]}),"header-right":g(function(){return[s(u,{icon:"el-search",class:"!mr-[1rem] !w-[26rem]",modelValue:j(Q).search,"onUpdate:modelValue":e[1]||(e[1]=function(n){return j(Q).search=n}),clearable:"",placeholder:"镜像名、ID、使用的容器",onIconClick:e[2]||(e[2]=function(n){return f(1,j(Q).search)}),onClear:e[3]||(e[3]=function(n){return f(1)}),onKeyup:e[4]||(e[4]=O(function(n){return f(1,j(Q).search)},["enter"]))},null,8,["modelValue"]),s(j(P))]}),content:g(function(){return[s(j(S),{key:"ImageTable","max-height":j(o)-220},null,8,["max-height"])]}),"footer-left":g(function(){return[s(j(x))]}),"footer-right":g(function(){return[s(j(_))]}),popup:g(function(){return t(e[5]||(e[5]=[]))}),_:1})])}}});n("default",L(vn,[["__scopeId","data-v-71d635d4"]]))}}})}();
Save File
Cancel